import {
	http
} from '@/service/index.js'
import store from '@/store/index.js'
import configs from '@/config/index.js'





// 获取注册验证码 mobilePhone
export const registerCode = async (data) => {
	return await http.post(`/system/login/registerCode`, data)
}

// 注册账号
// mobilePhone复制
// [string]	是	用户手机号		
// msgCode	
// [string]	是	用户验证码		
// passwd	
// [string]	是	密码		
// referralCode	
// [string]	是	推荐码。填写推荐人手机号
export const register = async (data) => {
	return await http.post(`/system/login/register`, data)
}

export const loginpasswd = async (data, config = {}) => {
	return await http.post(`/system/login/passwd`, data, config)
}

export const logout = async (data, config = {}) => {
	return await http.get(`/system/login/logout`, data, config)
}
export const forgetPasswd = async (data, config = {}) => {
	return await http.post(`/system/login/forgetPasswd`, data, config)
}

export const forgetPasswdCode = async (data, config = {}) => {
	return await http.post(`/system/login/forgetPasswdCode`, data, config)
}

export const checkForUpdates = async (data, config = {}) => {
	return await http.get(`/system/appversion/checkForUpdates`, data, config)
}
